export const updateRoute = (t) => {
  if (t) {
    const state = {}
    const title = t.title
    const url = '#' + t.name //'hello-world.html'
    history.pushState(state, title, url)
  }
}

export const getRoute = () => {
  let hash = location.hash
  if (hash.indexOf("#") === 0) {
    return hash.substring(1)
  }
  return ""
}